﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 投票
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("投票")]
	[BindTable("Vote", Description = "投票", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class Vote
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private String _Code;
		/// <summary>
		/// 代码
		/// </summary>
		[Description("代码")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(2, "Code", "代码", "", "nvarchar(100)", 0, 0, true)]
		public String Code
		{
			get { return _Code; }
			set { if (OnPropertyChange("Code", value)) _Code = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private String _Title;
		/// <summary>
		/// 标题
		/// </summary>
		[Description("标题")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(4, "Title", "标题", "", "nvarchar(100)", 0, 0, true)]
		public String Title
		{
			get { return _Title; }
			set { if (OnPropertyChange("Title", value)) _Title = value; }
		}

		private Int32 _Total;
		/// <summary>
		/// 总共
		/// </summary>
		[Description("总共")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(5, "Total", "总共", "", "int", 10, 0, false)]
		public Int32 Total
		{
			get { return _Total; }
			set { if (OnPropertyChange("Total", value)) _Total = value; }
		}

		private DateTime _StartTime;
		/// <summary>
		/// 开始时间
		/// </summary>
		[Description("开始时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(6, "StartTime", "开始时间", "", "datetime2", 7, 0, false)]
		public DateTime StartTime
		{
			get { return _StartTime; }
			set { if (OnPropertyChange("StartTime", value)) _StartTime = value; }
		}

		private DateTime _EndTime;
		/// <summary>
		/// 结束时间
		/// </summary>
		[Description("结束时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(7, "EndTime", "结束时间", "", "datetime2", 7, 0, false)]
		public DateTime EndTime
		{
			get { return _EndTime; }
			set { if (OnPropertyChange("EndTime", value)) _EndTime = value; }
		}

		private String _IPLimit;
		/// <summary>
		/// 地址限制
		/// </summary>
		[Description("地址限制")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(8, "IPLimit", "地址限制", "", "nvarchar(1)", 0, 0, true)]
		public String IPLimit
		{
			get { return _IPLimit; }
			set { if (OnPropertyChange("IPLimit", value)) _IPLimit = value; }
		}

		private String _VerifyFlag;
		/// <summary>
		/// 验证标记
		/// </summary>
		[Description("验证标记")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(9, "VerifyFlag", "验证标记", "", "nvarchar(1)", 0, 0, true)]
		public String VerifyFlag
		{
			get { return _VerifyFlag; }
			set { if (OnPropertyChange("VerifyFlag", value)) _VerifyFlag = value; }
		}

		private Int32 _Width;
		/// <summary>
		/// 宽度
		/// </summary>
		[Description("宽度")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(10, "Width", "宽度", "", "int", 10, 0, false)]
		public Int32 Width
		{
			get { return _Width; }
			set { if (OnPropertyChange("Width", value)) _Width = value; }
		}

		private Int32 _RelaCatalogID;
		/// <summary>
		/// 关系类别编号
		/// </summary>
		[Description("关系类别编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(11, "RelaCatalogID", "关系类别编号", "", "int", 10, 0, false)]
		public Int32 RelaCatalogID
		{
			get { return _RelaCatalogID; }
			set { if (OnPropertyChange("RelaCatalogID", value)) _RelaCatalogID = value; }
		}

		private Int32 _VoteCatalogID;
		/// <summary>
		/// 投票类别编号
		/// </summary>
		[Description("投票类别编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(12, "VoteCatalogID", "投票类别编号", "", "int", 10, 0, false)]
		public Int32 VoteCatalogID
		{
			get { return _VoteCatalogID; }
			set { if (OnPropertyChange("VoteCatalogID", value)) _VoteCatalogID = value; }
		}

		private String _Prop1;
		/// <summary>
		/// 属性1
		/// </summary>
		[Description("属性1")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(13, "Prop1", "属性1", "", "nvarchar(50)", 0, 0, true)]
		public String Prop1
		{
			get { return _Prop1; }
			set { if (OnPropertyChange("Prop1", value)) _Prop1 = value; }
		}

		private String _Prop2;
		/// <summary>
		/// 属性2
		/// </summary>
		[Description("属性2")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(14, "Prop2", "属性2", "", "nvarchar(50)", 0, 0, true)]
		public String Prop2
		{
			get { return _Prop2; }
			set { if (OnPropertyChange("Prop2", value)) _Prop2 = value; }
		}

		private String _Prop3;
		/// <summary>
		/// 属性3
		/// </summary>
		[Description("属性3")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(15, "Prop3", "属性3", "", "nvarchar(50)", 0, 0, true)]
		public String Prop3
		{
			get { return _Prop3; }
			set { if (OnPropertyChange("Prop3", value)) _Prop3 = value; }
		}

		private String _Prop4;
		/// <summary>
		/// 属性4
		/// </summary>
		[Description("属性4")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(16, "Prop4", "属性4", "", "nvarchar(50)", 0, 0, true)]
		public String Prop4
		{
			get { return _Prop4; }
			set { if (OnPropertyChange("Prop4", value)) _Prop4 = value; }
		}

		private String _AddUser;
		/// <summary>
		/// 添加用户
		/// </summary>
		[Description("添加用户")]
		[DataObjectField(false, false, false, 200)]
		[BindColumn(17, "AddUser", "添加用户", "", "nvarchar(200)", 0, 0, true)]
		public String AddUser
		{
			get { return _AddUser; }
			set { if (OnPropertyChange("AddUser", value)) _AddUser = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(18, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _ModifyUser;
		/// <summary>
		/// 修改用户
		/// </summary>
		[Description("修改用户")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(19, "ModifyUser", "修改用户", "", "nvarchar(200)", 0, 0, true)]
		public String ModifyUser
		{
			get { return _ModifyUser; }
			set { if (OnPropertyChange("ModifyUser", value)) _ModifyUser = value; }
		}

		private DateTime _ModifyTime;
		/// <summary>
		/// 修改时间
		/// </summary>
		[Description("修改时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(20, "ModifyTime", "修改时间", "", "datetime2", 7, 0, false)]
		public DateTime ModifyTime
		{
			get { return _ModifyTime; }
			set { if (OnPropertyChange("ModifyTime", value)) _ModifyTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(21, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(22, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(23, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(24, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "Code" : return _Code;
					case "SiteID" : return _SiteID;
					case "Title" : return _Title;
					case "Total" : return _Total;
					case "StartTime" : return _StartTime;
					case "EndTime" : return _EndTime;
					case "IPLimit" : return _IPLimit;
					case "VerifyFlag" : return _VerifyFlag;
					case "Width" : return _Width;
					case "RelaCatalogID" : return _RelaCatalogID;
					case "VoteCatalogID" : return _VoteCatalogID;
					case "Prop1" : return _Prop1;
					case "Prop2" : return _Prop2;
					case "Prop3" : return _Prop3;
					case "Prop4" : return _Prop4;
					case "AddUser" : return _AddUser;
					case "AddTime" : return _AddTime;
					case "ModifyUser" : return _ModifyUser;
					case "ModifyTime" : return _ModifyTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "Code" : _Code = Convert.ToString(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "Title" : _Title = Convert.ToString(value); break;
					case "Total" : _Total = Convert.ToInt32(value); break;
					case "StartTime" : _StartTime = Convert.ToDateTime(value); break;
					case "EndTime" : _EndTime = Convert.ToDateTime(value); break;
					case "IPLimit" : _IPLimit = Convert.ToString(value); break;
					case "VerifyFlag" : _VerifyFlag = Convert.ToString(value); break;
					case "Width" : _Width = Convert.ToInt32(value); break;
					case "RelaCatalogID" : _RelaCatalogID = Convert.ToInt32(value); break;
					case "VoteCatalogID" : _VoteCatalogID = Convert.ToInt32(value); break;
					case "Prop1" : _Prop1 = Convert.ToString(value); break;
					case "Prop2" : _Prop2 = Convert.ToString(value); break;
					case "Prop3" : _Prop3 = Convert.ToString(value); break;
					case "Prop4" : _Prop4 = Convert.ToString(value); break;
					case "AddUser" : _AddUser = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "ModifyUser" : _ModifyUser = Convert.ToString(value); break;
					case "ModifyTime" : _ModifyTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得投票字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 代码
			///</summary>
			public const String Code = "Code";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 标题
			///</summary>
			public const String Title = "Title";

			///<summary>
			/// 总共
			///</summary>
			public const String Total = "Total";

			///<summary>
			/// 开始时间
			///</summary>
			public const String StartTime = "StartTime";

			///<summary>
			/// 结束时间
			///</summary>
			public const String EndTime = "EndTime";

			///<summary>
			/// 地址限制
			///</summary>
			public const String IPLimit = "IPLimit";

			///<summary>
			/// 验证标记
			///</summary>
			public const String VerifyFlag = "VerifyFlag";

			///<summary>
			/// 宽度
			///</summary>
			public const String Width = "Width";

			///<summary>
			/// 关系类别编号
			///</summary>
			public const String RelaCatalogID = "RelaCatalogID";

			///<summary>
			/// 投票类别编号
			///</summary>
			public const String VoteCatalogID = "VoteCatalogID";

			///<summary>
			/// 属性1
			///</summary>
			public const String Prop1 = "Prop1";

			///<summary>
			/// 属性2
			///</summary>
			public const String Prop2 = "Prop2";

			///<summary>
			/// 属性3
			///</summary>
			public const String Prop3 = "Prop3";

			///<summary>
			/// 属性4
			///</summary>
			public const String Prop4 = "Prop4";

			///<summary>
			/// 添加用户
			///</summary>
			public const String AddUser = "AddUser";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 修改用户
			///</summary>
			public const String ModifyUser = "ModifyUser";

			///<summary>
			/// 修改时间
			///</summary>
			public const String ModifyTime = "ModifyTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}